package com.example.demo.finitestatemachine.transition;

import com.example.demo.finitestatemachine.event.LiftEvent;
import com.example.demo.finitestatemachine.event.LiftEventCodeEnums;
import com.example.demo.finitestatemachine.state.LiftState;

/**
 * @author liyuncong
 * @version 1.0
 * @file ArrivedTransition
 * @brief ArrivedTransition
 * @details ArrivedTransition
 * @date 2022-12-28
 *
 * Edit History
 * ----------------------------------------------------------------------------
 * DATE                        NAME               DESCRIPTION
 * 2022-12-28                  liyuncong          Created
 */
public class ArrivedTransition extends AbstractLiftTransition {
    public ArrivedTransition(
        LiftState currentState,
        LiftState nextState
    ) {
        super(currentState, nextState, LiftEventCodeEnums.ARRIVED);
    }

    @Override
    protected boolean doExecute(LiftEvent event) {
        System.out.println("Lift arrived the floor ...");
        return false;
    }
}
